﻿@model IEnumerable<ProjectBordspil.Models.GameModel>

@{
    ViewBag.Title = "Games";
}

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="/Scripts/GameNameScript.js" type="text/javascript"></script>

<h2 class="InfoHeader">Borðspil</h2>

<div id="ListAllGames">
@foreach (var game in Model)
{
	<div id="ASingleGame">
        <div id="ListGamesImage">
            <img src="@game.image" alt="Ekki var hægt að birta myndina." height="100" width="100" />
        </div>
        <div id="ListGameInfo">
            <ul id="GamesUl">
                <li><h4 class="LiGameInfo">@game.name</h4></li>
                <li><b>Tegund: </b> @game.type</li>
                <li><b>Lýsing: </b><em>@game.description</em></li>
            </ul>
           <form action="/Game/@game.nameOfView" method="post">
                <b>Nafn:</b>
             <input id="GameName" name="gameName" type="text" />
            <input type="submit" id="GetName" class="NameButton" value="Spila"/>
           </form>            
        </div>
	</div>
}
</div>
